package foodmaterial.dao;

import foodmaterial.dto.CustomerRecipePriceTemplateDto;
import foodmaterial.dto.RecipeSupplyDto;
import foodmaterial.dto.RecipeTemplateDto;
import foodmaterial.dto.RecipeTypeDto;
import foodmaterial.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RecipeDao {
    int insertRecipeType(RecipeType menuType) ;
    int updateRecipeType(RecipeType menuType) ;
    List<RecipeType> selectRecipeType(RecipeTypeDto dto) ;

    int insertRecipeTemplate(RecipeTemplate menuTemplate) ;
    int updateRecipeTemplate(RecipeTemplate menuTemplate) ;
    int stopRecipeTemplate(RecipeTemplate menuTemplate) ;
    List<RecipeTemplate> selectRecipeTemplate(RecipeTemplateDto dto) ;

    int insertRecipeTemplateDetails(List<RecipeTemplateDetails> details) ;
    int deleteRecipeTemplateDetails(Long templateId) ;
    List<RecipeTemplateDetails> selectRecipeTemplateDetails(Long templateId) ;

    int insertRecipeSupply(List<RecipeSupply> data) ;
    int deleteRecipeSupply(RecipeSupplyDto dto) ;
    List<RecipeSupply> selectRecipeSupply(RecipeSupplyDto dto) ;
    List<RecipeSupply> checkRecipeSupply(RecipeSupplyDto dto) ;
    int checkRecipeSupplyCount(RecipeSupplyDto dto) ;

    List<RecipeTemplate> selectRecipe(RecipeTemplateDto dto) ;
    List<RecipeTemplate> selectVipRecipe(RecipeTemplateDto dto) ;
    List<RecipeTemplate> selectSupplyRecipe(RecipeTemplateDto dto) ;
    List<RecipeTemplate> selectVipSupplyRecipe(RecipeTemplateDto dto) ;
    List<RecipeTemplateDetails> selectRecipeDetails(List<RecipeTemplate> templateIds) ;

    int batchUpdateRecipePrice(List<RecipeTemplate> recipes);

    int insertCustomerRecipePriceTemplate(CustomerRecipePriceTemplate customerRecipePriceTemplate) ;
    int insertCustomerRecipePriceTemplateDetail(List<CustomerRecipePriceTemplateDetail> details) ;
    int updateCustomerRecipePriceTemplate(CustomerRecipePriceTemplate customerRecipePriceTemplate);
    int deleteCustomerRecipePriceTemplate(Long id);
    int deleteCustomerRecipePriceTemplateDetail(Long templateId) ;
    List<CustomerRecipePriceTemplate> selectCustomerRecipePriceTemplate(CustomerRecipePriceTemplateDto dto) ;
    List<CustomerRecipePriceTemplateDetail> selectCustomerRecipePriceTemplateDetail(CustomerRecipePriceTemplateDto dto) ;
    int insertCustomerRecipePrice(List<CustomerRecipePrice> customerRecipePrice) ;
    int deleteCustomerRecipePrice(CustomerRecipePriceTemplateDto dto);
    List<CustomerRecipePrice> selectCustomerRecipePrice(CustomerRecipePriceTemplateDto dto) ;
}
